<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>SSO统一登录</title>
    <style>
        .login-box {
            width: 300px;
            margin: 100px auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
        }
        input {
            width: 100%;
            padding: 8px;
            box-sizing: border-box;
        }
        .error {
            color: red;
            margin-bottom: 15px;
        }
        button {
            width: 100%;
            padding: 10px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="login-box">
    <h2>SSO统一登录中心</h2>
    <div class="error" th:text="${error}" th:if="${error != null}"></div>
    <form action="/doLogin" method="post">
        <input type="hidden" th:name="clientId" th:value="${clientId}">
        <input type="hidden" th:name="redirectUri" th:value="${redirectUri}">

        <div class="form-group">
            <label>用户名</label>
            <input type="text" name="username" value="admin" required>
        </div>
        <div class="form-group">
            <label>密码</label>
            <input type="password" name="password" value="123456" required>
        </div>
        <button type="submit">登录</button>
    </form>
</div>
</body>
</html>